Release 10.1A: OpenEdge Development:
Progress Dynamics Administration


Generated-4GL object execution and file naming

Progress Dynamics invokes generated-4GL static objects as an automatic component of its protocol for invoking any registered object. A generated-4GL static object is not, itself, registered in the Repository, but is associated with an existing logical object that is registered in the Repository. When a Dynamics application starts up an object, if Dynamics locates an appropriate generated-4GL file for this object, it invokes this generated file to render the object. Otherwise, it invokes the base object using its definition in the Repository.

Generated filenames

Dynamics locates generated files according to their filenames and locations. The filenames for generated-4GL static objects derive from the logical object name of the registered object and the customization result codes that you specify for static object generation (see the "Generating 4GL for dynamic objects as static objects" section).

The general syntax of this generated filename is:

Syntax
LogicalObjectName[_ResultCodeString].pgen 

The filename components include:

LogicalObjectName

The logical name of the object as it is registered in the Repository.

[_ResultCodeString]

When you specify customization result codes for object generation, they are appended to the LogicalObjectName, as shown in the order that you specify them. For more information, see Table D–1.

.pgen

The extension on the filename for a generated-4GL source code file.

Table D–1 shows how the 4GL Generator determines the filename for a generated static object using these components.

Table D–1: Determining the generated filename for a generated-4GL object
Sample result codes used for generation


Object has customizations?

Generated filename components

Sample generated filename for logical object CustWin
Default result code only.
No.
LogicalObjectName
.pgen 
CustWin.pgen 
Result codes specified in this order:
GUI
CLERK
ADMIN
Yes. Even if the object is only customized by one of the generation result codes, the whole object is considered customized.
LogicalObjectName
_ResultCodeString
.pgen 
CustWin_GUICLERKADMIN
.pgen 
Result codes specified in this order:
GUI
CLERK
ADMIN
No. Even if result codes are specified for generation, none are applied to the generated object.
LogicalObjectName
.pgen 
CustWin.pgen 

Locating and executing the files

The 4GL Generator stores all the object source files that it generates in the target directory that you specify. After compiling these files, you must deploy the r-code to a specific subdirectory of the session client cache directory to enable Dynamics to locate and execute them (see the "Deploying generated-4GL static objects" section).

Note: Dynamics uses this deployment area in the session client cache directory instead of the usual PROPATH search to locate generated-4GL objects for execution as a performance optimization. For more information on the client cache directory, see Appendix E "Performance Notes."

When Dynamics executes a logical object, it first looks for the r-code for a generated-4GL static equivalent in the client cache deployment area. It identifies the corresponding r-code according to a generated filename whose LogicalObjectName and ResultCodeString matches the logical object and the current session result code customizations. If an r-code file does not exist with a filename (customized) that matches the session customization settings, Dynamics attempts to execute an r-code file that has the same filename with no ResultCodeString component (not customized). If it cannot locate a matching customized r-code file or one that is not customized, or it cannot locate any generated-4GL r-code for the logical object, Dynamics executes the object according to its definition in the Repository.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095